home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / CIncludes / errno.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-05  |  3.4 KB  |  83 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     errno.h
  4.     Error reporting macros
  5.  
  6.     Copyright Apple Computer,Inc.  1995
  7.     All rights reserved
  8.  
  9.  * Warning:  Not all of these macros are a part of the ANSI C standard.
  10.  *           This header is not POSIX compliant.
  11.  *           The library functions are not guaranteed to set "errno"
  12.  *              to the value of any of the non-ANSI macros.
  13.  *           For portable code, do not use the non-ANSI macros.
  14.  
  15.  ************************************************************/
  16.  
  17. /* Conditional Macros:
  18.  *  UsingStaticLibs - for CFM-68K:  Insures that #pragma import is never used.
  19.  *  <none>          - for CFM-68K:  Insures that all functions and data items are
  20.  *                                  marked as library imports
  21.  */
  22.  
  23.  
  24. #ifndef __ERRNO__
  25. #define __ERRNO__
  26.  
  27. #if defined (__CFM68K__) && !defined (UsingStaticLibs)
  28.     #pragma import on
  29. #endif
  30.  
  31. /* ANSI specified declarations */
  32.  
  33. #define EDOM        33   /* Argument outside function domain    */
  34. #define ERANGE      34   /* Result is too large to represent    */
  35.  
  36. extern int errno;
  37.  
  38. /* Mac specific declaration */
  39.  
  40. extern short MacOSErr;
  41.  
  42. /* Non-ANSI macro definitions */
  43.  
  44. #define EPERM        1   /* Operation not permitted             */
  45. #define ENOENT       2   /* No such file or directory           */
  46. #define ENORSRC      3   /* No such process                     */
  47. #define EINTR        4   /* Interrupted function call           */
  48. #define EIO          5   /* Input/Output error                  */
  49. #define ENXIO        6   /* No such device or address           */
  50. #define E2BIG        7   /* Argument list too long              */
  51. #define ENOEXEC      8   /* File not in executable format       */
  52. #define EBADF        9   /* Bad file descriptor (or number)     */
  53. #define ECHILD      10   /* No child process                    */
  54. #define EAGAIN      11   /* Resource temporarily unavailable    */
  55. #define ENOMEM      12   /* Not enough space                    */
  56. #define EACCES      13   /* File access permission denied       */
  57. #define EFAULT      14   /* Bad address as argument in call     */
  58. #define ENOTBLK     15   /* For backward compatibility          */
  59. #define EBUSY       16   /* System resource busy                */
  60. #define EEXIST      17   /* File already exists                 */
  61. #define EXDEV       18   /* Improper link attempted             */
  62. #define ENODEV      19   /* No such device                      */
  63. #define ENOTDIR     20   /* Pathname was not a directory        */
  64. #define EISDIR      21   /* Attempt to open directory for write */
  65. #define EINVAL      22   /* Invalid argument                    */
  66. #define ENFILE      23   /* Too many open files in system       */
  67. #define EMFILE      24   /* Too many open files in process      */
  68. #define ENOTTY      25   /* Inappropriate I/O control operation */
  69. #define ETXTBSY     26   /* Text file is busy                   */
  70. #define EFBIG       27   /* File too large                      */
  71. #define ENOSPC      28   /* No space left on device             */
  72. #define ESPIPE      29   /* Invalid seek                        */
  73. #define EROFS       30   /* Attempt to modify a read-only file  */
  74. #define EMLINK      31   /* Too many links on a single file     */
  75. #define EPIPE       32   /* Broken pipe; no process to read it  */
  76.  
  77.  
  78. #if defined (__CFM68K__) && !defined (UsingStaticLibs)
  79.     #pragma import off
  80. #endif
  81.  
  82. #endif  /* __ERRNO__ */
  83.